#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		int a,b,c,cnt;
		cnt = 0;
		for(int i = 0;i<n;i++)
		{
			scanf("%d %d %d",&a,&b,&c);
			if(a+b+c>=2) cnt++;
		}
		printf("%d\n",cnt);
	}
}
